home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 5_8.lha / 5_8 / 5_8A1.h < prev    next >
Text File  |  1993-08-08  |  393b  |  17 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. * the result of randint() is always >= 0    */
  6. * uniform distribution in the interval [0,MAX] */
  7. lass randint
  8.  
  9.    long randx;
  10.  
  11. ublic:
  12.          randint(long s = 0)    { randx = s; }
  13.    void  seed(long s)        { randx = s; }
  14.    int   draw();
  15.    float fdraw();
  16. ;
  17.